<template>
  <div class="detail-container">
    <div class="approval">
      <el-button type="primary" @click="showApproval">审核</el-button>
    </div>
    <InboundBill v-if="formcode === 'Wms_IncomeBillMaster'" :id="formId" />
    <OutboundBill v-if="formcode === 'Wms_OutboundBillMaster'" :id="formId" />
    <CheckOrder v-if="formcode === 'Wms_CheckOrderMaster'" :id="formId" />
    <TransferOrder v-if="formcode === 'Wms_TransferOrderMaster'" :id="formId" />
    <DiffIncomeBill
      v-if="formcode === 'Wms_DiffIncomeBillMaster'"
      :id="formId"
    />
    <DiffoutboundBill
      v-if="formcode === 'Wms_DiffIncomeBillMaster'"
      :id="formId"
    />
    <!-- <ArrivalConfirm :id="formId" /> -->
    <Workflow
      :drawershow="isdrawershow"
      :formcode="formcode"
      :formid="formId"
      @handclose="isdrawershow = false"
    />
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import InboundBill from './components/inboundBill.vue'
  import OutboundBill from './components/outboundBill.vue'
  import CheckOrder from './components/checkOrder.vue'
  import TransferOrder from './components/transferOrder.vue'
  import DiffIncomeBill from './components/diffIncomeBill.vue'
  import DiffoutboundBill from './components/diffoutboundBill.vue'
  import ArrivalConfirm from './components/arrivalConfirm.vue'
  import Workflow from '@/views/components/wordflow/index.vue'

  const route = useRoute()
  const formcode: any = ref('')
  const formId: any = ref('')
  if (route.query) {
    formId.value = route.query.formId
    formcode.value = route.query.formcode
  }
  const isdrawershow = ref(false)
  const showApproval = () => {
    isdrawershow.value = true
  }
</script>

<style lang="scss" scoped>
  .detail-container {
    .approval {
      display: flex;
      padding: 10px;
      // flex-direction: row-reverse;
      // padding-right: 10%;
      // padding-bottom: 20px;
    }
  }
</style>
